<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/6/10
  Time: 9:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.bwf.pojo.Cla" %>
<%@ page import="com.bwf.pojo.Student" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<%
    String name = "张三";
//    application.setAttribute("name", "application-" + name);
//    session.setAttribute("name", "session-" + name);
//    request.setAttribute("name", "request-" + name);

//    pageContext.setAttribute("name", "application-" + name, PageContext.APPLICATION_SCOPE);
//    pageContext.setAttribute("name", "session-" + name, PageContext.SESSION_SCOPE);
//    pageContext.setAttribute("name", "request-" + name, PageContext.REQUEST_SCOPE);
//    pageContext.setAttribute("name", "page-" + name, PageContext.PAGE_SCOPE);

//    ServletRequest req = pageContext.getRequest();

    Student student = new Student("张三", 20);

    Cla cla = new Cla();
    cla.setName("22期");
    cla.setNum(30);
    cla.setStudent(student);

    request.setAttribute("cla", cla);
%>
<h3>全域查找：${name}</h3>
<h3>session：${sessionScope.name}</h3>
<h3>request：${requestScope.name}</h3>
<h3>page：${pageScope.name}</h3>
<hr/>
<h3>${cla.name}</h3>
<h3>${cla.student.name == '张三'}</h3>
<h3>${cla.student.sex ne '男'}</h3>
</body>
</html>
